package org.bsc.mgwt.client.widget.base;

import java.io.Serializable;

import com.google.gwt.place.shared.Place;

/**
 * 
 * @author bsorrentino
 *
 */
@SuppressWarnings("serial")
public class MMenuItem implements Serializable {
	
	private boolean selectable = true;
	private String text = "";
	private String styleName = "";
	private final Place target;
	
	public MMenuItem(String text, Place target, String styleName, boolean selectable) {
		super();
		this.target = target;
		this.text = text;
		this.styleName = styleName;
		this.selectable = selectable;
	}

	public MMenuItem(String text, Place target, String styleName) {
		this( text, target, styleName, true);
	}

	public MMenuItem(String text, Place target ) {
		this( text, target, "", true);
	}

	public MMenuItem(Place target ) {
		this( target.toString(), target, "", true);
	}

	@Override
	public String toString() {
		return text;
	}

	public final void setSelectable(boolean selectable) {
		this.selectable = selectable;
	}

	public final boolean isSelectable() {
		return selectable;
	}

	public final String getText() {
		return text;
	}

	public final void setText(String text) {
		this.text = text;
	}

	public final String getStyleName() {
		return styleName;
	}

	public final void setStyleName(String styleName) {
		this.styleName = styleName;
	}

	public final Place getTarget() {
		return target;
	}

	
}
